<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>



<title></title>



<link rel="stylesheet" type="text/css" href="css/addcar.css" media="all">
</head>
<body>
<div class="colorarea01">
	<div class="search clearfix">
		<div class="searchL">
			<ul class="menulist">
				<li><a href="addmodel" class="add">添加车型</a></li>
			</ul>
		</div>
	</div>
	<form action="" method="post" name="form">
		<table class="listtable" cellpadding="0" cellspacing="0" width="100%">
			<tbody>
			<tr>
				<th width="30">选择</th>
				<th width="30">ID</th>
				<th width="60">排序</th>
				<th align="left">名称</th>
				<th width="100">操作</th>
			</tr>
			@foreach($model as $v)
			<tr>
				<td align="center"><input name="bulkid" value="{{$v->sid}}" type="checkbox"></td>
				<td align="center">{{$v->sid}}</td>
				<td align="center"><input size="5" name="orderid[]" value="{{$v->orderid}}" class="ip01" type="text"></td>
				<td align="left">{{$v->s_name}}</td>
				<td class="rightmenu" align="center"><a href="modelupd/{{$v->sid}}" class="edit">编辑</a> | <a href="javascript:if(confirm('确定要删除吗？'))location='modeldel/{{$v->sid}}'" class="del">删除</a></td>
			</tr>
			@endforeach	
						<tr>
				<td colspan="5" class="buttontd"><a href="javascript:javascript:selectAll();" title="请选择后操作">全选</a> 
				<a href="modeldel/{{$v->sid}}a=bulkid[]" title="请选择后操作">删除</a> <a href="modelupd/{{$v->sid}}&amp;a=bulksort" title="请选择后操作">更新排序</a></td>
			</tr>
		</tbody></table>
	</form>
</div>

</body>
<script>
function selectAll(){
    var a = document.form.getElementsByTagName("input");
    if(a[0].checked == true)
    {
        for (var i=0; i<a.length; i++)
        if (a[i].type == "checkbox") a[i].checked = false;
    }
    else
    {
        for (var i=0; i<a.length; i++)
        if (a[i].type == "checkbox") a[i].checked = true;
    }
    // var a = document.form.getElementsByTagName("input");    
    // var z = $('input[name=bulkid]').val();
    // 	alert(z);

}

</script>
</html>
